//
//  HXDetailVideoTCell.m
//  ZCooking
//
//  Created by 韩旭 on 16/9/10.
//  Copyright © 2016年 HX_. All rights reserved.
//

#import "HXDetailVideoTCell.h"
#import "HX_Macro.h"
#import "HXTagsModel.h"

@implementation HXDetailVideoTCell
- (NSMutableArray *)arrText {
    if (!_arrText) {
        _arrText = [NSMutableArray array];
    }
    return _arrText;
}
- (void)setArrBtn:(NSMutableArray *)arrBtn {
    _arrBtn = arrBtn;
    for (HXTagsModel *tag in self.arrBtn) {
        [self.arrText addObject:tag.text];
    }
    [self setUp];
    
}

- (void)setUp {
    for (int i = 0; i < _arrBtn.count; i++) {
        self.tagBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_tagBtn setTitle:self.arrText[i] forState:UIControlStateNormal];
        _tagBtn.titleLabel.font = [UIFont systemFontOfSize:10];
        [_tagBtn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
        _tagBtn.frame = CGRectMake((50 + 10) * i + (self.biaoqianBtn.HX_x + 10 + self.biaoqianBtn.HX_width), 490, 50, 20);
        [self.contentView addSubview:_tagBtn];
    }

}



- (void)awakeFromNib {
    self.difficultyBtn.font = [UIFont systemFontOfSize:12];
    self.taste.font = [UIFont systemFontOfSize:12];
    self.creatTime.font = [UIFont systemFontOfSize:12];
}
//{
//    UILabel *spacingLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 50, 280, 50)];
//    spacingLabel.text = self.allDataArray[indexPath.row][@"content"];
//    spacingLabel.numberOfLines = 0;
//    spacingLabel.font  = [UIFont systemFontOfSize:12];
//    spacingLabel.textColor = [UIColor darkGrayColor];
//    
//    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];
//    [paragraphStyle setLineSpacing:8];
//    
//    NSMutableAttributedString *attributedString =  [[NSMutableAttributedString alloc] initWithString:spacingLabel.text attributes:@{NSKernAttributeName : @(1.5f)}];
//    [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, spacingLabel.text.length)];
//    
//    spacingLabel.attributedText = attributedString;
//    
//    
//    CGSize size = CGSizeMake(280, 500000);
//    CGSize labelSize = [spacingLabel sizeThatFits:size];
//    spacingLabel.frame = CGRectMake(20, 50, labelSize.width, labelSize.height);
//    
//    [cell.contentView addSubview:spacingLabel];
//}


@end